
package simuri.disambiguation;

/**
 * Returns algorithms when provided with their names. Default is set to normalized
 * hits
 * @author ngonga
 */
public class AlgorithmFactory {
    
  public static Algorithm get(String name)
    {
        if(name.toLowerCase().startsWith("apriori")) return new AprioriAlgorithm();
        if(name.toLowerCase().startsWith("similarity")) return new SimilarityAlgorithm();
        if(name.toLowerCase().startsWith("linear")) return new LinearAlgorithm();
        if(name.toLowerCase().startsWith("weightedco")) return new WeightedCoherence();
        return new NormalizedHits();
    }
    
}
